function t(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}

var a = t(require("../../api/api")), i = t(require("../../utils/filter")), e = getApp();

Page({
    data: {
        buttonClicked: !1
    },
    onShow: function() {
        this.onLoad();
    },
    onLoad: function() {
        this.getUserStatistics();
    },
    getUserStatistics: function() {
        var t = this, n = {
            i_token: e.globalData.token
        };
        a.default.getUserStatistics({
            data: n,
            success: function(a) {
                if (a && a.data.data) {
                    var n = a.data.data;
                    n.payment_account_cny = i.default.convertCurrencyToCNY(n.payment_account.available_itc_usd, e.globalData.currencyDatum), 
                    n.payment_account_usd = (n.payment_account.available_itc_usd / 100).toFixed(2), 
                    t.setData({
                        userStatisticsDatum: n
                    });
                }
            }
        });
    },
    bindToPurchase: function(t) {
        wx.navigateTo({
            url: "../wallet/purchase/purchase"
        });
    },
    bindToWalletDetail: function(t) {
        e.globalData.isClick || (e.globalData.isClick = !0, wx.navigateTo({
            url: "../wallet/detail/detail",
            success: function() {
                setTimeout(function() {
                    e.globalData.isClick = !1;
                }, 1e3);
            }
        }));
    },
    bindToGiftCard: function(t) {
        wx.navigateTo({
            url: "../wallet/giftcard/giftcard"
        });
    },
    bindToCoupon: function(t) {
        wx.navigateTo({
            url: "../wallet/couponlist/coupon"
        });
    }
});